package net.huashitong.shiro;


import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

public class Principal implements Serializable {
    private static final long serialVersionUID = 1L;
    private String userId;
    private Map<String, Object> cacheMap;
    private boolean superAdmin;

    public Principal() {
    }

    public boolean isSuperAdmin() {
        return this.superAdmin;
    }

    public void setSuperAdmin(boolean superAdmin) {
        this.superAdmin = superAdmin;
    }

    public String getUserId() {
        return this.userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public void setCacheMap(Map<String, Object> cacheMap) {
        this.cacheMap = cacheMap;
    }

    public Map<String, Object> getCacheMap() {
        if (this.cacheMap == null) {
            this.cacheMap = new HashMap();
        }

        return this.cacheMap;
    }
}
